import login from '../pages/Login/Login.vue'
import main from '../pages/main/main.vue'
import aside from '../components/aside.vue'
import userInfoManagement from '../components/userInfoManagement.vue'
import healthCode from '../components/healthCodeManagement.vue'
import userLocation from '../components/userLocationManagement.vue'
import vaccine from '../components/vaccineManagement.vue'
import { createRouter, createMemoryHistory } from 'vue-router'

const router = createRouter({
    history: createMemoryHistory(), routes: [
        {
            name: 'login',
            path: '/',
            components: {
                login
            }
        },
        {
            name: 'main',
            path: '/index',
            components: {
                main,
            },
            children: [
                {
                    name: 'aside',
                    path: '',
                    components: {
                        mainPage: aside
                    },
                    children: [
                        {
                            path: 'userInfo',
                            components: {
                                userInfoManagement
                            }
                        },
                        {
                            path: 'healthCode',
                            components: {
                                healthCode
                            }
                        },
                        {
                            path: 'userLocation',
                            components: {
                                userLocation
                            }
                        },
                        {
                            path: 'vaccine',
                            components: {
                                vaccine
                            }
                        }

                    ]
                }
            ]
        }
    ]
})
export default router